<template>
  <view class="container">
    <img :src="img" class="invite-img" alt="Invite Image">
    <img src="../../static/tuiguang.png" class="background-img" alt="Promotion Image">
    <div style="text-align: center;width: 100%;margin: 10px;">长按保存图片并分享给好友吧！</div>
  </view>
</template>

<script>
import { getInviteImg } from "@/api/apiService";

export default {
  data() {
    return {
      img: ''
    }
  },

  created() {
    this.getInviteImg()
  },

  methods: {
    async getInviteImg() {
      const response = await getInviteImg()
      this.img = response.data.url
    }
  }
}
</script>

<style scoped lang="scss">
.container {
  position: relative;
  width: 100%;
  height: auto;
}

.invite-img {
  position: absolute;
  top: 65%;
  left: 50%;
  width: 150px;
  height: auto;
  z-index: 10;
  transform: translate(-50%, -50%);
}

.background-img {
  width: 100%;
  height: auto;
  display: block;
}
</style>
